/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.diplomka.webapp.market;

import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.panel.Panel;

/**
 *
 * @author Jakub Kutil
 */
public class MarketPanel extends Panel {

    public MarketPanel(String id, PageParameters parameters) {
        super(id);

        if (parameters.containsKey("id")) {
            PageParameters p = new PageParameters();
            p.add("id", parameters.getString("id"));

            BookmarkablePageLink<Void> newCaravan = new BookmarkablePageLink<>("newCaravan", NewCaravanPage.class, p);
            add(newCaravan);

            BookmarkablePageLink<Void> caravans = new BookmarkablePageLink<>("caravans", CaravanPage.class, p);
            add(caravans);

            BookmarkablePageLink<Void> buy = new BookmarkablePageLink<>("buy", BuyPage.class, p);
            add(buy);
            
            BookmarkablePageLink<Void> sell = new BookmarkablePageLink<>("sell", SellPage.class, p);
            add(sell);
        }
    }
}